package com.woniuxy.secondfactory.impl;

import com.woniuxy.secondfactory.Person;

/**
 * @Author 罗蔚
 * @Date 2022/3/23 12:10
 * @Description TODO
 */
public class PersonFactory {
    public Person getPerson(String rose) throws Exception{
        Class<?> clazz = Class.forName("com.woniuxy.secondfactory.impl." + rose);

        return (Person)clazz.newInstance();
    }
}
